package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysAllowbidMapper;
import com.ruoyi.system.domain.SysAllowbid;
import com.ruoyi.system.service.ISysAllowbidService;
import com.ruoyi.common.core.text.Convert;

/**
 * 允许竞价Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-13
 */
@Service
public class SysAllowbidServiceImpl implements ISysAllowbidService 
{
    @Autowired
    private SysAllowbidMapper sysAllowbidMapper;

    /**
     * 查询允许竞价
     * 
     * @param allowBidId 允许竞价ID
     * @return 允许竞价
     */
    @Override
    public SysAllowbid selectSysAllowbidById(Long allowBidId)
    {
        return sysAllowbidMapper.selectSysAllowbidById(allowBidId);
    }

    /**
     * 查询允许竞价列表
     * 
     * @param sysAllowbid 允许竞价
     * @return 允许竞价
     */
    @Override
    public List<SysAllowbid> selectSysAllowbidList(SysAllowbid sysAllowbid)
    {
        return sysAllowbidMapper.selectSysAllowbidList(sysAllowbid);
    }

    /**
     * 新增允许竞价
     * 
     * @param sysAllowbid 允许竞价
     * @return 结果
     */
    @Override
    public int insertSysAllowbid(SysAllowbid sysAllowbid)
    {
        sysAllowbid.setCreateTime(DateUtils.getNowDate());
        return sysAllowbidMapper.insertSysAllowbid(sysAllowbid);
    }

    /**
     * 修改允许竞价
     * 
     * @param sysAllowbid 允许竞价
     * @return 结果
     */
    @Override
    public int updateSysAllowbid(SysAllowbid sysAllowbid)
    {
        return sysAllowbidMapper.updateSysAllowbid(sysAllowbid);
    }

    /**
     * 删除允许竞价对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysAllowbidByIds(String ids)
    {
        return sysAllowbidMapper.deleteSysAllowbidByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除允许竞价信息
     * 
     * @param allowBidId 允许竞价ID
     * @return 结果
     */
    @Override
    public int deleteSysAllowbidById(Long allowBidId)
    {
        return sysAllowbidMapper.deleteSysAllowbidById(allowBidId);
    }
}
